package com.liao.dao;

import com.liao.entity.PatientRandomExtract;
import com.liao.util.JDBCUtils;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;

import java.util.List;

public class PatientRandomExtractDaoImpl {
    private JdbcTemplate template = new JdbcTemplate(JDBCUtils.getDataSource());

    public List<PatientRandomExtract> findAll() {
        String sql = " select * from patient_random_extract";
        return template.query(sql, new BeanPropertyRowMapper<PatientRandomExtract>(PatientRandomExtract.class));
    }
}
